<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title></title>
    <link rel="stylesheet" type="text/css" href="../../css/api.css" />
    <style>
        [v-cloak] {
            display: none;
        }

        html,
        body {
            background-color: #fff;
            padding: 0;
            margin: 0;
        }

        .content-container {
            margin-top: 56.25vw;
        }
        /*番剧简介*/

        .post-intro {
            padding: 20px 0;
            height: auto;
            background-color: #FEFEFE;
            position: relative;
            box-shadow: 1px 1px 5px #ddd;
        }

        .post-intro .intro-img {
            height: 120px;
            width: 90px;
            float: left;
            margin: 0 15px;
            background-size: cover;
            background-position: center;
            background-repeat: no-repeat;
            border-radius: 5px;
            background-color: #009688;
            border: 1px solid #ddd;
        }

        .post-intro .intro-img:active {
            opacity: 0.6;
        }

        .post-intro .intro-content {
            color: #515151;
            padding-right: 15px;
            margin-left: 122px;
        }

        .intro-content:active {
            opacity: 0.6;
        }

        .intro-content .intro-title {
            color: #515151;
            font-size: 20px;
            overflow: hidden;
            text-overflow: ellipsis;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
        }

        .intro-content .gv {
            color: #999;
            padding: 4px 0 0 2px;
        }

        .intro-content .statistic {
            padding: 10px 0;
            background-color: #FEFEFE;
            display: flex;
            flex-direction: row;
            align-items: center;
        }

        .statistic .pv-icon {
            height: 20px;
            width: 20px;
            margin-right: 5px;
        }

        .statistic .pv {
            color: #999;
            font-size: 16px;
            margin-right: 10px;
        }

        .statistic .comments-icon {
            height: 18px;
            width: 18px;
            margin-right: 5px;
        }

        .statistic .comments-num {
            color: #999;
            font-size: 16px;
            margin-right: 10px;
        }

        .post-label span {
            padding: 5px 10px;
            background-color: #F2AA24;
            border-radius: 5px;
            color: #FFF;
            margin-right: 6px;
            margin-bottom: 5px;
            font-size: 14px;
        }
        /*番剧集数列表*/

        .video-list {
            padding: 10px 2vw;
            background-color: #FEFEFE;
            display: flex;
            flex-direction: row;
            align-items: center;
            flex-wrap: wrap;
            clear: both;
        }

        .video-item {
            width: 44vw;
            height: 60px;
            background-color: #FEFEFE;
            margin: 10px 2vw;
            border-radius: 5px;
            box-shadow: 3px 3px 8px #999;
            display: flex;
            flex-direction: row;
            align-items: center;
            flex-wrap: wrap;
        }
        .video-item:active{
            opacity: 0.6;
        }

        .video-item .avatar {
            height: 40px;
            width: 40px;
            margin: 10px;
            border-radius: 50%;
            background-image: url('../../image/avatar.png');
            background-position: center;
            background-size: contain;
        }

        .video-item .intro {
            width: 70px;
        }

        .intro .oid {
            color: #515151;
            font-size: 16px;
            text-overflow: ellipsis;
            overflow: hidden;
            white-space: nowrap;
        }

        .intro .title {
            color: #515151;
            font-size: 14px;
            text-overflow: ellipsis;
            overflow: hidden;
            white-space: nowrap;
        }
        /*没有数据，正在加载*/

        .loading {
            text-align: center;
            padding-top: 10px;
            padding-bottom: 10px;
            display: flex;
            flex-direction: column;
            align-items: center;
        }

        .loading img {
            height: 40px;
            width: 40px;
            animation: que 1.6s linear infinite;
        }

        @keyframes que {
            0% {
                transform: rotate(0deg);
            }
            100% {
                transform: rotate(360deg);
            }
        }
    </style>
</head>

<body>

    <div id="app" v-cloak>

        <div class="content-container">

            <div class="post-intro" v-if="postIntro !== null">
                <div :style="getImgUrl(postIntro.content)" alt="" class="intro-img" @click="goAvDetail"></div>
                <div class="intro-content" @click="goAvComments" tapmode>
                    <div class="intro-title">{{postIntro.title}}</div>
                    <div class="gv">gv{{postIntro.id}}</div>
                    <div class="statistic">
                        <img class="pv-icon" src="../../image/pv.png" alt=""><span class="pv">{{postPV}}</span>
                        <img class="comments-icon" src="../../image/comments.png" alt=""><span class="comments-num">{{postCV}}</span>
                    </div>
                    <div class="post-label">
                        <template v-for="sort in sortArr" v-if="sortArr.length !== 0">
                            <span v-text="sort"></span>
                        </template>
                        <template v-for="tag in tagArr" v-if="tagArr.length !== 0">
                            <span v-text="tag"></span>
                        </template>
                    </div>
                </div>
            </div>

            <div class="video-list" v-if="videosList !== null">
                <div class="video-item" v-for="item in videosList" @click="playVideo(item.content,item.title,$event)">
                    <img :src="getAvatar(item.uqq)" alt="" class="avatar">
                    <div class="intro">
                        <p class="oid">第{{item.oid}}话</p>
                        <p class="title">{{item.title}}</p>
                    </div>
                </div>
            </div>
            <!-- 提示数据为空图片 -->
            <div class="tips" style="text-align:center;">
                <img src="../../image/empty.png" style="width:200px;height:160px;margin-top:20px;" alt="" v-if="videosList === null">
                <p style="font-size:14px;color:#999;" v-if="videosList === null">空空如也</p>
            </div>
            <!-- 提示网络错误图片 -->
            <div class="tips" style="text-align:center;margin-bottom:20px;" v-show="isError" @click="reload">
                <img src="../../image/error.png" style="width:200px;height:160px;margin-top:20px;" alt="">
                <p style="font-size:14px;color:#999;">喔！出错啦，点我重试</p>
            </div>
            <!-- 加载图标 -->
            <div class='loading' v-show="loading">
                <img src='../../image/loading.png'>
            </div>

        </div>

    </div>

    <script src="../../script/vendors/api.js"></script>
    <script src="../../script/vendors/vue.min.js"></script>
    <script src="../../script/vendors/axios.min.js"></script>
    <script src="../../script/vendors/hyperdown.js"></script>
    <script src="../../script/vendors/md5.min.js"></script>
    <script src="../../script/dist/videoPlay.js"></script>
</body>

</html>
